package cn.zwx.infra.svc.domain.enums;

import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * @author zhangwenxue
 */
@Getter
@AllArgsConstructor
public enum InfraRespCodeEnum {


    /**
     *  SMS_CHANNEL_NOT_EXISTS_ERROR
     */
    SMS_CHANNEL_NOT_EXISTS_ERROR(30001, "短信渠道不存在"),
    ;

    private final Integer code;
    private final String message;

    public static InfraRespCodeEnum getByCode(Integer code) {
        for (InfraRespCodeEnum item : values()) {
            if (item.code.equals(code)) {
                return item;
            }
        }
        return null;
    }
}
